1. Field of the Invention
The present invention relates to an information processing apparatus and to a method of controlling power of this apparatus.
2. Description of the Related Art
An apparatus in which data in storage means is backed up by a backup power supply is known in the art. For example, there is an apparatus equipped with a write cache in a case where the storage means utilizes a magnetic disk drive (referred to as an “HDD” below) or the like. The write-cache function is such that when a write command and write data have been received from the apparatus, the data is stored in a buffer memory temporarily, the completion of the command is sent back to the apparatus before the data is written and the actual writing of the data is performed thereafter. At the moment the data is sent to the buffer memory utilized as the cache while the write-cache function is being executed, end of data write to the HDD is recognized by the apparatus. However, the time it takes to write the data from the buffer memory to the magnetic disk is longer than the time it takes to write the data from the apparatus to the buffer memory. In actuality, therefore, the writing of data to the HDD does not end unless all of the data in the buffer memory is transferred to the magnetic disk.
Accordingly, in order to solve the problem of loss of data owing to inadvertent cut-off of the HDD power supply, a power failure or a power supply anomaly such as a drop in voltage due to a sudden large increase in load, a technique using a backup power supply as the backup power supply has been proposed (see the specification of Japanese Patent Application Laid-Open No. 7-44982). Specifically, this patent document proposes a method according to which the backup power supply is activated and data in a write cache is written to a magnetic disk medium in the event that a main power supply develops an anomaly.
However, the prior art described above does not take the lifetime of the backup power supply into consideration. When a device is used for a prolonged period of time or is used under high temperatures, the charging capacity of the backup power supply gradually declines, the length of time during which power can be supplied shortens and there is the possibility that the data in the write cache will no longer be capable of being backed up. Further, if the charging capacity is too small and backup time too short, there is the likelihood that supply of power will stop while the writing of the data in the write cache to the magnetic disk is in progress and that this will lead to a magnetic disk defect such as a defective sector.